
HelpView
	proc
		Display(mob/chatter/C, page, query)
			switch(page)
				if("index")
					winset(C, "help.index", "is-checked=true")
					winset(C, "help.contents", "is-checked=false")
					winset(C, "help.topics", "is-checked=false")
					winset(C, "help.child", "right=help_index")
				if("contents")
					winset(C, "help.index", "is-checked=false")
					winset(C, "help.contents", "is-checked=true")
					winset(C, "help.topics", "is-checked=false")
					winset(C, "help.child", "right=help_contents")
					for(var/obj/help/chapter/H in world)
						H.icon_state = "chapter"
						H.open -= C.name
					winset(C, "contents_output.info", "is-visible=true")
					winset(C, "contents_output.globe", "is-visible=true")
					winset(C, "contents_output.copy1", "is-visible=true")
					winset(C, "contents_output.copy2", "is-visible=true")
					winset(C, "contents_output.output", "is-visible=false")
					C << output(null, "contents_output.output")
					C << output(null, "contents_grid.output")
					C << output("<a href='byond://?dest=helpman&action=open&target=[url_encode(HelpMan.Main.name)]' style='color:#000000;text-decoration:none;'><img class=\"icon\" src=\"\ref[HelpMan.Main.icon]\" iconstate=\"[HelpMan.Main.icon_state]\">[HelpMan.Main.name]</a>", "contents_grid.output")
				if("topics")
					winset(C, "help.index", "is-checked=false")
					winset(C, "help.contents", "is-checked=false")
					winset(C, "help.topics", "is-checked=true")
					winset(C, "help.child", "right=help_topics")
					winset(C, "topics_output.info", "is-visible=true")
					winset(C, "topics_output.globe", "is-visible=true")
					winset(C, "topics_output.copy1", "is-visible=true")
					winset(C, "topics_output.copy2", "is-visible=true")
					winset(C, "topics_output.output", "is-visible=false")
					C << output(null, "topics_output.output")
				if("search")
					winset(C, "help.index", "is-checked=false")
					winset(C, "help.contents", "is-checked=false")
					winset(C, "help.topics", "is-checked=false")
					winset(C, "help.child", "right=help_search")


		Initialize(mob/chatter/C)
			if(!C || !C.client) return
			winset(C, "help.index", "command='ShowHelp \"index\"';")
			winset(C, "help.contents", "command='ShowHelp \"contents\"';")
			winset(C, "help.topics", "command='ShowHelp \"topics\"';")